<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://correspondence.updatecontrols.com/pox/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://correspondence.updatecontrols.com/pox/1.0">
	<xs:complexType name="FactTree">
		<xs:sequence>
			<xs:element name="DatabaseId" type="xs:long"/>
			<xs:element name="Facts" nillable="true" type="tns:ArrayOfFact"/>
			<xs:element name="Roles" nillable="true" type="tns:ArrayOfFactRole"/>
			<xs:element name="Types" nillable="true" type="tns:ArrayOfFactType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="FactTree" nillable="true" type="tns:FactTree"/>
	<xs:complexType name="ArrayOfFact">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="Fact" nillable="true" type="tns:Fact"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ArrayOfFact" nillable="true" type="tns:ArrayOfFact"/>
	<xs:complexType name="Fact">
		<xs:sequence>
			<xs:element name="Data" nillable="true" type="xs:base64Binary"/>
			<xs:element name="FactId" type="xs:long"/>
			<xs:element name="FactTypeId" type="xs:int"/>
			<xs:element name="Predecessors" nillable="true" type="tns:ArrayOfPredecessor"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="Fact" nillable="true" type="tns:Fact"/>
	<xs:complexType name="ArrayOfPredecessor">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="Predecessor" nillable="true" type="tns:Predecessor"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ArrayOfPredecessor" nillable="true" type="tns:ArrayOfPredecessor"/>
	<xs:complexType name="Predecessor">
		<xs:sequence>
			<xs:element name="PredecessorId" type="xs:long"/>
			<xs:element name="RoleId" type="xs:int"/>
			<xs:element name="IsPivot" nillable="true" type="xs:boolean"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="Predecessor" nillable="true" type="tns:Predecessor"/>
	<xs:complexType name="ArrayOfFactRole">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="FactRole" nillable="true" type="tns:FactRole"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ArrayOfFactRole" nillable="true" type="tns:ArrayOfFactRole"/>
	<xs:complexType name="FactRole">
		<xs:sequence>
			<xs:element name="DeclaringTypeId" type="xs:int"/>
			<xs:element name="IsPivot" type="xs:boolean"/>
			<xs:element name="RoleId" type="xs:int"/>
			<xs:element name="RoleName" nillable="true" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="FactRole" nillable="true" type="tns:FactRole"/>
	<xs:complexType name="ArrayOfFactType">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="FactType" nillable="true" type="tns:FactType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="ArrayOfFactType" nillable="true" type="tns:ArrayOfFactType"/>
	<xs:complexType name="FactType">
		<xs:sequence>
			<xs:element name="TypeId" type="xs:int"/>
			<xs:element name="TypeName" nillable="true" type="xs:string"/>
			<xs:element name="Version" type="xs:int"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="FactType" nillable="true" type="tns:FactType"/>
	<xs:complexType name="ArrayOfPivotId">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="PivotId">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="FactId" nillable="true" type="xs:long"/>
        				<xs:element name="Timestamp" type="xs:long"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
  <xs:element name="GetRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Domain" nillable="true" type="xs:string"/>
        <xs:element name="PivotTree" nillable="true" type="tns:FactTree"/>
        <xs:element name="PivotId" type="xs:long"/>
        <xs:element name="Timestamp" type="xs:long"/>
        <xs:element name="ClientGuid" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="GetResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="FactTree" nillable="true" type="tns:FactTree"/>
        <xs:element name="Timestamp" type="xs:long"/>
      </xs:sequence>
		</xs:complexType>
	</xs:element>
  <xs:element name="GetManyRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Domain" nillable="true" type="xs:string"/>
        <xs:element name="PivotTree" nillable="true" type="tns:FactTree"/>
        <xs:element name="PivotIds" type="tns:ArrayOfPivotId"/>
        <xs:element name="ClientGuid" type="xs:string"/>
        <xs:element name="TimeoutSeconds" type="xs:int"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="GetManyResponse">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="FactTree" nillable="true" type="tns:FactTree"/>
        <xs:element name="PivotIds" type="tns:ArrayOfPivotId"/>
      </xs:sequence>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="PostRequest">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Domain" nillable="true" type="xs:string"/>
				<xs:element name="MessageBody" nillable="true" type="tns:FactTree"/>
				<xs:element name="ClientGuid" type="xs:string"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="PostResponse">
		<xs:complexType>
			<xs:sequence/>
		</xs:complexType>
	</xs:element>
  <xs:element name="SubscribeRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Domain" nillable="true" type="xs:string"/>
        <xs:element name="PivotTree" nillable="true" type="tns:FactTree" />
        <xs:element name="PivotId" type="xs:long" />
        <xs:element name="DeviceUri" nillable="true" type="xs:string" />
        <xs:element name="ClientGuid" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="UnsubscribeRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Domain" nillable="true" type="xs:string"/>
        <xs:element name="PivotTree" nillable="true" type="tns:FactTree" />
        <xs:element name="PivotId" type="xs:long" />
        <xs:element name="DeviceUri" nillable="true" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="SubscribeResponse">
    <xs:complexType>
      <xs:sequence/>
    </xs:complexType>
  </xs:element>
  <xs:element name="UnsubscribeResponse">
    <xs:complexType>
      <xs:sequence/>
    </xs:complexType>
  </xs:element>
</xs:schema>